//    Copyright (C) 2013  <lugocreation@gmail.com>
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
package org.jpgolay.me.item;

import java.io.Serializable;
import java.math.BigDecimal;

public class Item
        implements Serializable {

    public Item() {
    }

    public Item(String id, String famillesArticlesId, BigDecimal priceList2, BigDecimal priceList3, BigDecimal priceList4, String date2, String date3,
            String date4, String fournisseurId, String free1, String free2, Integer tvaId, String emplacement, String uniteVenre,
            String date, String detailRevient, Integer packaging, BigDecimal promotion, BigDecimal priceList1, BigDecimal alerte, String commentaire,
            String web, BigDecimal prixRevient, BigDecimal prixAchatPondere, String designation, String updateLastTime, String userId, String gtin,
            byte photo1[], byte photo2[], byte photo3[], byte photo4[], byte photo5[], byte photo6[], byte photo7[],
            byte photo8[], byte photo9[], byte photo10[], String photosValid, String description) {
        setId(id);
        setFamillesArticlesId(famillesArticlesId);
        setPriceList2(priceList2);
        setPriceList3(priceList3);
        setPriceList4(priceList4);
        setDate2(date2);
        setDate3(date3);
        setDate4(date4);
        setFree1(free1);
        setTvaId(tvaId);
        setFournisseurId(fournisseurId);
        setFree2(free2);
        setEmplacement(emplacement);
        setUniteVente(uniteVenre);
        setDate(date);
        setDetailRevient(detailRevient);
        setPackaging(packaging);
        setPromotion(promotion);
        setPriceList1(priceList1);
        setAlerte(alerte);
        setCommentaire(commentaire);
        setWeb(web);
        setPrixRevient(prixRevient);
        setPrixAchatPondere(prixAchatPondere);
        setDesignation(designation);
        setUpdateLastTime(updateLastTime);
        setUserId(userId);
        setGtin(gtin);
        setPhoto1(photo1);
        setPhoto2(photo2);
        setPhoto3(photo3);
        setPhoto4(photo4);
        setPhoto5(photo5);
        setPhoto6(photo6);
        setPhoto7(photo7);
        setPhoto8(photo8);
        setPhoto9(photo9);
        setPhoto10(photo10);
        setPhotosValid(photosValid);
        setDescription(description);
    }

    public Item(Item item) {
        setId(item.getId());
        setFamillesArticlesId(item.getFamillesArticlesId());
        setPriceList2(item.getPriceList2());
        setPriceList3(item.getPriceList3());
        setPriceList4(item.getPriceList4());
        setDate2(item.getDate2());
        setDate3(item.getDate3());
        setDate4(item.getDate4());
        setFree1(item.getFree1());
        setTvaId(item.getTvaId());
        setFournisseurId(item.getFournisseurId());
        setFree2(item.getFree2());
        setEmplacement(item.getEmplacement());
        setUniteVente(item.getUniteVente());
        setDate(item.getDate());
        setDetailRevient(item.getDetailRevient());
        setPackaging(item.getPackaging());
        setPromotion(item.getPromotion());
        setPriceList1(item.getPriceList1());
        setAlerte(item.getAlerte());
        setCommentaire(item.getCommentaire());
        setWeb(item.getWeb());
        setPrixRevient(item.getPrixRevient());
        setPrixAchatPondere(item.getPrixAchatPondere());
        setDesignation(item.getDesignation());
        setUpdateLastTime(item.getUpdateLastTime());
        setUserId(item.getUserId());
        setGtin(item.getGtin());
        setPhoto1(item.getPhoto1());
        setPhoto2(item.getPhoto2());
        setPhoto3(item.getPhoto3());
        setPhoto4(item.getPhoto4());
        setPhoto5(item.getPhoto5());
        setPhoto6(item.getPhoto6());
        setPhoto7(item.getPhoto7());
        setPhoto8(item.getPhoto8());
        setPhoto9(item.getPhoto9());
        setPhoto10(item.getPhoto10());
        setPhotosValid(item.getPhotosValid());
        setDescription(item.getDescription());
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getFamillesArticlesId() {
        return famillesArticlesId;
    }

    public void setFamillesArticlesId(String famillesArticlesId) {
        this.famillesArticlesId = famillesArticlesId;
    }

    public BigDecimal getPriceList2() {
        return priceList2;
    }

    public void setPriceList2(BigDecimal priceList2) {
        this.priceList2 = priceList2;
    }

    public BigDecimal getPriceList3() {
        return priceList3;
    }

    public void setPriceList3(BigDecimal priceList3) {
        this.priceList3 = priceList3;
    }

    public BigDecimal getPriceList4() {
        return priceList4;
    }

    public void setPriceList4(BigDecimal priceList4) {
        this.priceList4 = priceList4;
    }

    public String getDate2() {
        return date2;
    }

    public void setDate2(String date2) {
        this.date2 = date2;
    }

    public String getDate3() {
        return date3;
    }

    public void setDate3(String date3) {
        this.date3 = date3;
    }

    public String getDate4() {
        return date4;
    }

    public void setDate4(String date4) {
        this.date4 = date4;
    }

    public String getFournisseurId() {
        return fournisseurId;
    }

    public void setFournisseurId(String fournisseurId) {
        this.fournisseurId = fournisseurId;
    }

    public String getFree1() {
        return free1;
    }

    public void setFree1(String free1) {
        this.free1 = free1;
    }

    public String getFree2() {
        return free2;
    }

    public void setFree2(String free2) {
        this.free2 = free2;
    }

    public Integer getTvaId() {
        return tvaId;
    }

    public void setTvaId(Integer tvaId) {
        this.tvaId = tvaId;
    }

    public String getDetailRevient() {
        return detailRevient;
    }

    public void setDetailRevient(String detailRevient) {
        this.detailRevient = detailRevient;
    }

    public Integer getPackaging() {
        return packaging;
    }

    public void setPackaging(Integer packaging) {
        this.packaging = packaging;
    }

    public BigDecimal getPromotion() {
        return promotion;
    }

    public void setPromotion(BigDecimal promotion) {
        this.promotion = promotion;
    }

    public BigDecimal getPriceList1() {
        return priceList1;
    }

    public void setPriceList1(BigDecimal priceList1) {
        this.priceList1 = priceList1;
    }

    public BigDecimal getAlerte() {
        return alerte;
    }

    public void setAlerte(BigDecimal alerte) {
        this.alerte = alerte;
    }

    public String getCommentaire() {
        return commentaire;
    }

    public void setCommentaire(String commentaire) {
        this.commentaire = commentaire;
    }

    public String getWeb() {
        return web;
    }

    public void setWeb(String web) {
        this.web = web;
    }

    public BigDecimal getPrixRevient() {
        return prixRevient;
    }

    public void setPrixRevient(BigDecimal prixRevient) {
        this.prixRevient = prixRevient;
    }

    public String getDesignation() {
        return designation;
    }

    public void setDesignation(String designation) {
        this.designation = designation;
    }

    public BigDecimal getPrixAchatPondere() {
        return prixAchatPondere;
    }

    public void setPrixAchatPondere(BigDecimal prixAchatPondere) {
        this.prixAchatPondere = prixAchatPondere;
    }

    public String getUpdateLastTime() {
        return updateLastTime;
    }

    public void setUpdateLastTime(String updateLastTime) {
        this.updateLastTime = updateLastTime;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getUniteVente() {
        return uniteVente;
    }

    public void setUniteVente(String uniteVenre) {
        uniteVente = uniteVenre;
    }

    public String getEmplacement() {
        return emplacement;
    }

    public void setEmplacement(String emplacement) {
        this.emplacement = emplacement;
    }

    public String getGtin() {
        return gtin;
    }

    public void setGtin(String gtin) {
        this.gtin = gtin;
    }

    public byte[] getPhoto1() {
        return photo1;
    }

    public void setPhoto1(byte photo1[]) {
        this.photo1 = photo1;
    }

    public byte[] getPhoto10() {
        return photo10;
    }

    public void setPhoto10(byte photo10[]) {
        this.photo10 = photo10;
    }

    public byte[] getPhoto2() {
        return photo2;
    }

    public void setPhoto2(byte photo2[]) {
        this.photo2 = photo2;
    }

    public byte[] getPhoto3() {
        return photo3;
    }

    public void setPhoto3(byte photo3[]) {
        this.photo3 = photo3;
    }

    public byte[] getPhoto4() {
        return photo4;
    }

    public void setPhoto4(byte photo4[]) {
        this.photo4 = photo4;
    }

    public byte[] getPhoto5() {
        return photo5;
    }

    public void setPhoto5(byte photo5[]) {
        this.photo5 = photo5;
    }

    public byte[] getPhoto6() {
        return photo6;
    }

    public void setPhoto6(byte photo6[]) {
        this.photo6 = photo6;
    }

    public byte[] getPhoto7() {
        return photo7;
    }

    public void setPhoto7(byte photo7[]) {
        this.photo7 = photo7;
    }

    public byte[] getPhoto8() {
        return photo8;
    }

    public void setPhoto8(byte photo8[]) {
        this.photo8 = photo8;
    }

    public byte[] getPhoto9() {
        return photo9;
    }

    public void setPhoto9(byte photo9[]) {
        this.photo9 = photo9;
    }

    public String getPhotosValid() {
        return photosValid;
    }

    public void setPhotosValid(String photosValid) {
        this.photosValid = photosValid;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String toString() {
        StringBuffer str = new StringBuffer("{");
        str.append("id=" + getId() + " " + "famillesArticlesId=" + getFamillesArticlesId() + " " + "priceList2=" + getPriceList2() + " " + "priceList3=" + getPriceList3() + " " + "priceList4=" + getPriceList4() + " " + "date2=" + getDate2() + " " + "date3=" + getDate3() + " " + "date4=" + getDate4() + " " + "free1=" + getFree1() + " " + "tvaId=" + getTvaId() + " " + "fournisseurId=" + getFournisseurId() + " " + "free2=" + getFree2() + " " + "emplacement=" + getEmplacement() + " " + "uniteVente=" + getUniteVente() + " " + "date=" + getDate() + " " + "detailRevient=" + getDetailRevient() + " " + "packaging=" + getPackaging() + " " + "promotion=" + getPromotion() + " " + "priceList1=" + getPriceList1() + " " + "alerte=" + getAlerte() + " " + "commentaire=" + getCommentaire() + " " + "web=" + getWeb() + " " + "prixRevient=" + getPrixRevient() + " " + "prixAchatPondere=" + getPrixAchatPondere() + " " + "designation=" + getDesignation() + " " + "updateLastTime=" + getUpdateLastTime() + " " + "gtin=" + getGtin() + " " + "photosValid=" + getPhotosValid() + " " + "description=" + getDescription() + " " + "userId=" + getUserId());
        str.append('}');
        return str.toString();
    }

    public boolean equals(Object pOther) {
        if (pOther instanceof Item) {
            Item lTest = (Item) pOther;
            boolean lEquals = true;
            if (id == null) {
                lEquals = lEquals && lTest.id == null;
            } else {
                lEquals = lEquals && id.equals(lTest.id);
            }
            if (famillesArticlesId == null) {
                lEquals = lEquals && lTest.famillesArticlesId == null;
            } else {
                lEquals = lEquals && famillesArticlesId.equals(lTest.famillesArticlesId);
            }
            if (priceList2 == null) {
                lEquals = lEquals && lTest.priceList2 == null;
            } else {
                lEquals = lEquals && priceList2.equals(lTest.priceList2);
            }
            if (priceList3 == null) {
                lEquals = lEquals && lTest.priceList3 == null;
            } else {
                lEquals = lEquals && priceList3.equals(lTest.priceList3);
            }
            if (priceList4 == null) {
                lEquals = lEquals && lTest.priceList4 == null;
            } else {
                lEquals = lEquals && priceList4.equals(lTest.priceList4);
            }
            if (date2 == null) {
                lEquals = lEquals && lTest.date2 == null;
            } else {
                lEquals = lEquals && date2.equals(lTest.date2);
            }
            if (date3 == null) {
                lEquals = lEquals && lTest.date3 == null;
            } else {
                lEquals = lEquals && date3.equals(lTest.date3);
            }
            if (date4 == null) {
                lEquals = lEquals && lTest.date4 == null;
            } else {
                lEquals = lEquals && date4.equals(lTest.date4);
            }
            if (free1 == null) {
                lEquals = lEquals && lTest.free1 == null;
            } else {
                lEquals = lEquals && free1.equals(lTest.free1);
            }
            if (tvaId == null) {
                lEquals = lEquals && lTest.tvaId == null;
            } else {
                lEquals = lEquals && tvaId.equals(lTest.tvaId);
            }
            if (fournisseurId == null) {
                lEquals = lEquals && lTest.fournisseurId == null;
            } else {
                lEquals = lEquals && fournisseurId.equals(lTest.fournisseurId);
            }
            if (free2 == null) {
                lEquals = lEquals && lTest.free2 == null;
            } else {
                lEquals = lEquals && free2.equals(lTest.free2);
            }
            if (emplacement == null) {
                lEquals = lEquals && lTest.emplacement == null;
            } else {
                lEquals = lEquals && emplacement.equals(lTest.emplacement);
            }
            if (detailRevient == null) {
                lEquals = lEquals && lTest.detailRevient == null;
            } else {
                lEquals = lEquals && detailRevient.equals(lTest.detailRevient);
            }
            if (packaging == null) {
                lEquals = lEquals && lTest.packaging == null;
            } else {
                lEquals = lEquals && packaging.equals(lTest.packaging);
            }
            if (promotion == null) {
                lEquals = lEquals && lTest.promotion == null;
            } else {
                lEquals = lEquals && promotion.equals(lTest.promotion);
            }
            if (priceList1 == null) {
                lEquals = lEquals && lTest.priceList1 == null;
            } else {
                lEquals = lEquals && priceList1.equals(lTest.priceList1);
            }
            if (alerte == null) {
                lEquals = lEquals && lTest.alerte == null;
            } else {
                lEquals = lEquals && alerte.equals(lTest.alerte);
            }
            if (commentaire == null) {
                lEquals = lEquals && lTest.commentaire == null;
            } else {
                lEquals = lEquals && commentaire.equals(lTest.commentaire);
            }
            if (web == null) {
                lEquals = lEquals && lTest.web == null;
            } else {
                lEquals = lEquals && web.equals(lTest.web);
            }
            if (prixRevient == null) {
                lEquals = lEquals && lTest.prixRevient == null;
            } else {
                lEquals = lEquals && prixRevient.equals(lTest.prixRevient);
            }
            if (prixAchatPondere == null) {
                lEquals = lEquals && lTest.prixAchatPondere == null;
            } else {
                lEquals = lEquals && prixAchatPondere.equals(lTest.prixAchatPondere);
            }
            if (designation == null) {
                lEquals = lEquals && lTest.designation == null;
            } else {
                lEquals = lEquals && designation.equals(lTest.designation);
            }
            if (updateLastTime == null) {
                lEquals = lEquals && lTest.updateLastTime == null;
            } else {
                lEquals = lEquals && updateLastTime.equals(lTest.updateLastTime);
            }
            if (userId == null) {
                lEquals = lEquals && lTest.userId == null;
            } else {
                lEquals = lEquals && userId.equals(lTest.userId);
            }
            if (uniteVente == null) {
                lEquals = lEquals && lTest.uniteVente == null;
            } else {
                lEquals = lEquals && uniteVente.equals(lTest.uniteVente);
            }
            if (date == null) {
                lEquals = lEquals && lTest.date == null;
            } else {
                lEquals = lEquals && date.equals(lTest.date);
            }
            if (gtin == null) {
                lEquals = lEquals && lTest.gtin == null;
            } else {
                lEquals = lEquals && gtin.equals(lTest.gtin);
            }
            if (photo1 == null) {
                lEquals = lEquals && lTest.photo1 == null;
            } else {
                lEquals = lEquals && photo1.equals(lTest.photo1);
            }
            if (photo2 == null) {
                lEquals = lEquals && lTest.photo2 == null;
            } else {
                lEquals = lEquals && photo2.equals(lTest.photo2);
            }
            if (photo3 == null) {
                lEquals = lEquals && lTest.photo3 == null;
            } else {
                lEquals = lEquals && photo3.equals(lTest.photo3);
            }
            if (photo4 == null) {
                lEquals = lEquals && lTest.photo4 == null;
            } else {
                lEquals = lEquals && photo4.equals(lTest.photo4);
            }
            if (photo5 == null) {
                lEquals = lEquals && lTest.photo5 == null;
            } else {
                lEquals = lEquals && photo5.equals(lTest.photo5);
            }
            if (photo6 == null) {
                lEquals = lEquals && lTest.photo6 == null;
            } else {
                lEquals = lEquals && photo6.equals(lTest.photo6);
            }
            if (photo7 == null) {
                lEquals = lEquals && lTest.photo7 == null;
            } else {
                lEquals = lEquals && photo7.equals(lTest.photo7);
            }
            if (photo8 == null) {
                lEquals = lEquals && lTest.photo8 == null;
            } else {
                lEquals = lEquals && photo8.equals(lTest.photo8);
            }
            if (photo9 == null) {
                lEquals = lEquals && lTest.photo9 == null;
            } else {
                lEquals = lEquals && photo9.equals(lTest.photo9);
            }
            if (photo10 == null) {
                lEquals = lEquals && lTest.photo10 == null;
            } else {
                lEquals = lEquals && photo10.equals(lTest.photo10);
            }
            if (photosValid == null) {
                lEquals = lEquals && lTest.photosValid == null;
            } else {
                lEquals = lEquals && photosValid.equals(lTest.photosValid);
            }
            if (description == null) {
                lEquals = lEquals && lTest.description == null;
            } else {
                lEquals = lEquals && description.equals(lTest.description);
            }
            return lEquals;
        } else {
            return false;
        }
    }

    public int hashCode() {
        int result = 17;
        result = 37 * result + (id == null ? 0 : id.hashCode());
        result = 37 * result + (famillesArticlesId == null ? 0 : famillesArticlesId.hashCode());
        result = 37 * result + (priceList2 == null ? 0 : priceList2.hashCode());
        result = 37 * result + (priceList3 == null ? 0 : priceList3.hashCode());
        result = 37 * result + (priceList4 == null ? 0 : priceList4.hashCode());
        result = 37 * result + (date2 == null ? 0 : date2.hashCode());
        result = 37 * result + (date3 == null ? 0 : date3.hashCode());
        result = 37 * result + (date4 == null ? 0 : date4.hashCode());
        result = 37 * result + (free1 == null ? 0 : free1.hashCode());
        result = 37 * result + (tvaId == null ? 0 : tvaId.hashCode());
        result = 37 * result + (fournisseurId == null ? 0 : fournisseurId.hashCode());
        result = 37 * result + (free2 == null ? 0 : free2.hashCode());
        result = 37 * result + (emplacement == null ? 0 : emplacement.hashCode());
        result = 37 * result + (detailRevient == null ? 0 : detailRevient.hashCode());
        result = 37 * result + (packaging == null ? 0 : packaging.hashCode());
        result = 37 * result + (promotion == null ? 0 : promotion.hashCode());
        result = 37 * result + (priceList1 == null ? 0 : priceList1.hashCode());
        result = 37 * result + (alerte == null ? 0 : alerte.hashCode());
        result = 37 * result + (commentaire == null ? 0 : commentaire.hashCode());
        result = 37 * result + (web == null ? 0 : web.hashCode());
        result = 37 * result + (prixRevient == null ? 0 : prixRevient.hashCode());
        result = 37 * result + (prixAchatPondere == null ? 0 : prixAchatPondere.hashCode());
        result = 37 * result + (designation == null ? 0 : designation.hashCode());
        result = 37 * result + (updateLastTime == null ? 0 : updateLastTime.hashCode());
        result = 37 * result + (userId == null ? 0 : userId.hashCode());
        result = 37 * result + (uniteVente == null ? 0 : uniteVente.hashCode());
        result = 37 * result + (date == null ? 0 : date.hashCode());
        result = 37 * result + (gtin == null ? 0 : gtin.hashCode());
        result = 37 * result + (photo1 == null ? 0 : photo1.hashCode());
        result = 37 * result + (photo2 == null ? 0 : photo2.hashCode());
        result = 37 * result + (photo3 == null ? 0 : photo3.hashCode());
        result = 37 * result + (photo4 == null ? 0 : photo4.hashCode());
        result = 37 * result + (photo5 == null ? 0 : photo5.hashCode());
        result = 37 * result + (photo6 == null ? 0 : photo6.hashCode());
        result = 37 * result + (photo7 == null ? 0 : photo7.hashCode());
        result = 37 * result + (photo8 == null ? 0 : photo8.hashCode());
        result = 37 * result + (photo9 == null ? 0 : photo9.hashCode());
        result = 37 * result + (photo10 == null ? 0 : photo10.hashCode());
        result = 37 * result + (photosValid == null ? 0 : photosValid.hashCode());
        result = 37 * result + (description == null ? 0 : description.hashCode());
        return result;
    }
    private String id;
    private String designation;
    private String famillesArticlesId;
    private BigDecimal priceList2;
    private BigDecimal priceList3;
    private BigDecimal priceList4;
    private String date2;
    private String date3;
    private String date4;
    private String fournisseurId;
    private String free1;
    private String free2;
    private Integer tvaId;
    private String emplacement;
    private String uniteVente;
    private String date;
    private String detailRevient;
    private Integer packaging;
    private BigDecimal promotion;
    private String web;
    private BigDecimal prixRevient;
    private BigDecimal priceList1;
    private BigDecimal alerte;
    private String commentaire;
    private BigDecimal prixAchatPondere;
    private String updateLastTime;
    private String userId;
    private String gtin;
    private byte photo1[];
    private byte photo2[];
    private byte photo3[];
    private byte photo4[];
    private byte photo5[];
    private byte photo6[];
    private byte photo7[];
    private byte photo8[];
    private byte photo9[];
    private byte photo10[];
    private String photosValid;
    private String description;
}
